<template>
  <el-form :rules="rules" :model="users" label-width="200px" ref="editRef">
    <el-form-item label="患者真实姓名" prop="use">
      <el-input v-model="users.use" />
    </el-form-item>
    <el-form-item label="患者所在科室" prop="usesection">
      <el-input v-model="users.usesection" />
    </el-form-item>
    <el-form-item label="患者电话" prop="usephone">
      <el-input v-model="users.usephone" />
    </el-form-item>
    <el-form-item label="患者性别" prop="usesex">
      <el-radio-group v-model="users.usesex">
        <el-radio label="男" />
        <el-radio label="女" />
      </el-radio-group>
    </el-form-item>
    <el-form-item label="患者年龄" prop="useage">
      <el-input v-model="users.useage" />
    </el-form-item>
    <el-form-item label="患者地址" prop="useadress">
      <el-input v-model="users.useadress" />
    </el-form-item>
    <el-form-item label="入院日期" prop="usetime">
      <el-date-picker v-model="users.usetime" type="datetime" placeholder="选择入院时间" />
    </el-form-item>
  </el-form>
</template>

<script>
import { findMembers, modifyMember, addMembers } from '../../api/member'
export default {
  name: 'EditDoctor',
  data() {
    return {
      users: {
        use: "",
        symptom: "",
        usephone: "",
        useage: "",
        usesex: "",
        useadress: "",
        usetime: "",
        usesection: "",
      },
      rules: {
        use: [{ required: true, message: "请输入患者真实姓名", trigger: "blur" }],
        usesection: [{ required: true, message: "请输入患者所在科室", trigger: "blur" }],
        usephone: [{ required: true, message: "请输入患者电话号码", trigger: "blur" }],
        useage: [{ required: true, message: "请输入患者年龄", trigger: "blur" }],
        usesex: [{ required: true, message: "请选择性别", trigger: "blur" }],
        useadress: [{ required: true, message: "请输入患者地址", trigger: "blur" }],
        usetime: [{ required: true, message: "请选择注册时间", trigger: "blur" }],
      },
      uploadHeaders: {
        Authorization: `Bearer ${sessionStorage.getItem('token')}`,
      },
      uploadMethod: 'post',
      hasFileUpload: false,
    }
  },
  emits: ['success'],
}

</script>

<style lang="less" scoped>
.el-form {
  text-align: center;
}

.el-form-item {
  margin-left: -80px;
}

:deep(.el-upload) {
  width: 100px;
  height: 100px;

  img {
    width: 100%;
    height: 100%;
  }
}
</style>
